package br.com.abella.snippets.xml;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import junit.framework.Assert;

import org.junit.Test;

import br.com.abella.snippets.properties.PropertiesReader;

public class XMLReader {

	/**
	 * Read XML as Properties
	 * 
	 * @throws IOException
	 */
	@Test
	public void readXMLAsProperties() throws IOException {
		
		Properties properties = new Properties();
		
		InputStream is = PropertiesReader.class.getClassLoader().getResourceAsStream("PropertiesReader.xml");
				
		properties.loadFromXML(is);
		
		Assert.assertEquals(properties.getProperty("url"), "dadawdaa");
	}	
}